package com.chixing.controller;


import com.chixing.service.ICinemaService;
import com.chixing.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @since 2025-10-07
 */
@CrossOrigin
@RestController
@RequestMapping("/cinema")
public class CinemaController {
    @Autowired
    public ICinemaService cinemaService;
    @GetMapping("/page")
    public Result getByPage(@RequestParam(value = "page",required = false) Integer page){
        System.out.println("page" + page);
        return cinemaService.getByPage(page);
    }

    // 影院详情查询
    @GetMapping("/detail")
    public Result getCinemaDetail(@RequestParam("cinemaId") Integer cinemaId) {
        return cinemaService.getCinemaDetail(cinemaId);
    }
}